<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>


<script>
    var number = 1;
    var obj = {
        number: 2,
        show: function () {
            this.number = 3;
            (function () {
                console.log(this.number)
            })();
            console.log(this.number)
        }
    };
    obj.show();
</script>
</body>
</html>